package com.questionnaire.modular.system.controller;

import com.questionnaire.common.base.R;
import com.questionnaire.utils.ShiroKit;
import com.questionnaire.common.base.ShiroUser;
import org.apache.shiro.session.Session;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

/**
 * @description:
 * @author: YSL
 * @time: 2023/11/9 16:54
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @PostMapping("/test")
//    @CrossOrigin
    public R test(HttpServletRequest request){
        Session session1 = ShiroKit.getSession();
        ShiroUser user1 = ShiroKit.getUser();
        System.out.println(user1.getId()+user1.getUserAuth());
        return null;
    }
}
